<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Real Estate Builders Free Responsive Website Templates - icon">
    <meta name="author" content="">
    <title>FOREST公司官方</title>
    <link rel="favicon" href="assets/images/favicon.png">
    <link rel="stylesheet" media="screen" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/font-awesome.min.css">
    <script src="js/jquery-3.5.1.min.js"></script>
    <link rel="stylesheet" href="webjars/sweetalert2/10.10.0/dist/sweetalert2.min.css">
    <script src="webjars/sweetalert2/10.10.0/dist/sweetalert2.min.js"></script>
    <![endif]-->
    <!-- Custom styles for our template -->
    <link rel="stylesheet" href="assets/css/bootstrap-theme.css" media="screen">
    <link rel="stylesheet" href="assets/css/style.css">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="js/username.js"></script>
    <script src="assets/js/html5shiv.js"></script>
    <script src="assets/js/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<!-- Fixed navbar -->
<div class="navbar navbar-inverse">
    <div class="container">
        <div class="navbar-header">
            <!-- Button for smallest screens -->
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><span
                    class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
            <a class="navbar-brand" href="index.html">
                <img src="assets/images/logo.png" alt="Techro HTML5 template"></a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav pull-right mainNav">
                <li><a href="web-login.html">首页</a></li>
                <li><a href="web-projects.html">展示风采</a></li>
                <li><a href="web-price.html">费用信息</a></li>
                <li><a href="web-contact.html">维修管理</a></li>
                <li class="active"><a href="web-about.html">投诉管理</a></li>
                <li><a href="web-customer.html">客服管理</a></li>
                <li><a href="/forest/TuiChu">注销</a></li>
            </ul>
        </div>
        <!--/.nav-collapse -->
    </div>
</div>
<!-- /.navbar -->

<header id="head" class="secondary">
    <div class="container">
        <div class="row">
            <div class="col-sm-8">
                <h1> 投 诉 </h1>
            </div>
        </div>
    </div>
</header>

<!-- container -->
<div class="container">
    <div class="row">
        <div class="col-md-6">
            <h3 class="section-title">投诉简介</h3>
            <p>

            </p>

            <div class="form-group">
                <label>标题</label>
                <input type="text" class="form-control" placeholder="请输入你的标题" id="comTitle">
            </div>
            <div class="form-group">
                <label>投诉类别</label>
                <select class="form-control" id="comMatter">
                    <option value="物业服务" selected="selected">物业服务</option>
                    <option value="物业人员">物业人员</option>
                    <option value="其他">其他</option>
                </select>
            </div>
            <div class="form-group">
                <label>投诉说明</label>
                <textarea class="form-control" id="comContent" placeholder="请填写详细说明...."
                          style="height:100px;"></textarea>
            </div>
            <button type="submit" class="btn btn-two" id="submit">投诉</button>
            <p><br/></p>
        </div>
        <div class="col-md-6">
            <div class="row">
                <div class="col-md-6">
                    <h3 class="section-title">Forest公司</h3>
                    <div class="contact-info">
                        <h5>地址</h5>
                        <p>河南省郑州市中原区郑州轻工业学院</p>

                        <h5>Email</h5>
                        <p>wh508377132@163.com</p>

                        <h5>Phone</h5>
                        <p>+157 3762 6628 </p>
                    </div>
                </div>
                <div class="col-md-6">
                    <h3 class="section-title">上班时间</h3>
                    <div class="contact-info">
                        <h5>Monday - Friday</h5>
                        <p>09:00 AM - 6:30 PM</p>

                        <h5>Saturday</h5>
                        <p>Closed</p>

                        <h5>Sunday</h5>
                        <p>Closed</p>
                    </div>
                </div>
            </div>
            <h3 class="section-title">致词</h3>
            <p>
                非常欢迎你的来电或者申请，我们将全心全意为你服务
            </p>
        </div>
    </div>
</div>
<!-- /container -->


<footer id="footer">
    <div class="footer2">
        <div class="container">
            <div class="row">

                <div class="col-md-6 panel">
                    <div class="panel-body">
                        <p class="simplenav">
                            <a href="web-login.html">首页</a> |
                            <a href="web-projects.html">展示风采</a> |
                            <a href="web-price.html">费用信息</a> |
                            <a href="web-contact.html">维修管理</a> |
                            <a href="web-about.html">投诉管理</a> |
                            <a href="web-customer.html">客服管理</a>
                        </p>
                    </div>
                </div>


            </div>
            <!-- /row of panels -->
        </div>
    </div>
</footer>


<!-- JavaScript libs are placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/custom.js"></script>

<!-- Google Maps -->
<!--<script src="assets/js/google-map.js"></script>-->
<!--<script type='text/javascript' src='assets/js/jquery.min.js'></script>-->
<script type="text/javascript">
    //新增维修数据
    $("#submit").click(function () {
        var data = {
            "comTitle": $("#comTitle").val(),
            "comContent": $("#comContent").val(),
            "comMatter": $("#comMatter").val()
        };
        swal.fire({
            type: 'warning', // 弹框类型
            title: '提醒', //标题
            text: "请确认是否投诉", //显示内容
            confirmButtonColor: '#3085d6',// 确定按钮的 颜色
            confirmButtonText: '确定',// 确定按钮的 文字
            showCancelButton: true, // 是否显示取消按钮
            cancelButtonColor: '#d33', // 取消按钮的 颜色
            cancelButtonText: "取消", // 取消按钮的 文字
            focusCancel: true, // 是否聚焦 取消按钮
            reverseButtons: true  // 是否 反转 两个按钮的位置 默认是  左边 确定  右边 取消
        }).then(function (isConfirm) {
            if (isConfirm.value) {
                $.ajax({
                    url: "insertComplaint",
                    type: "POST",
                    dataType: "json",
                    contentType: 'application/json;charset=utf-8',
                    data: JSON.stringify(data),
                    async: true,
                    success: function (data) {
                        if (data.code == 200) {
                            Swal.fire("提示", "投诉成功", "success");
                            $("#comTitle").val("");
                            $("#comContent").val("");
                        } else {
                            Swal.fire("提示", "投诉失败", "error");
                        }
                    }
                });
            } else {
                Swal.fire("取消", "投诉取消", "error");
            }
        })
    });
    //启动页面加载
    $(function () {
        var data = {
            "num": 1
        };
        $.ajax({
            url: "Selective",
            type: "POST",
            dataType: "json",
            contentType: 'application/json;charset=utf-8',
            data: JSON.stringify(data),
            async: true,
            success: function (data) {
                if (data.code == 500) {
                    window.location.href = userUrl + "/web-login.html";
                }
            }
        });
    });


</script>

</body>
</html>
